package com.zhuiyun.educations.api.newCourse.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @ClassName CourseUnit
 * @Description TODO 课程章节表
 * @Author 杨友朋
 * @Date 2023/6/28 15:04
 **/
@Data
@Table(name = "course_unit")
public class CourseUnit implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id 杨友朋
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 章节名
     */
    private String unitName;

    /**
     * 章节介绍
     */
    private String unitIntroduction;

    /**
     * 课程id
     */
    private Integer courseId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern ="yyyy-MM-dd" )
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern ="yyyy-MM-dd" )
    private Date updateTime;

    /**
     * 删除标识（0显示，1删除）
     */
    private Integer delFlag;
    List<UnitJoint> joints;
}
